export default [
  { path: '/', redirect: '/index' },
  { path: '/index', name: '首页', icon: 'smile', component: './Index' },
  { path: '/shortLink', name: '短链生成', icon: 'link', component: './ShortLink' },
  {
    path: '/interfaceInfoDetail/:id',
    name: '详情',
    icon: 'smile',
    component: './InterfaceInfoDetail',
    hideInMenu: true,
  },
  {
    path: '/interfaceInfoCall/:id',
    name: '调用',
    icon: 'smile',
    component: './InterfaceInfoCall',
    hideInMenu: true,
  },
  {
    path: '/user',
    layout: false,
    routes: [{ name: '登录', path: '/user/login', component: './User/Login' }],
  },
  {
    path: '/admin',
    name: '管理页',
    icon: 'crown',
    access: 'canAdmin',
    routes: [
      { path: '/admin', redirect: '/admin/interfaceInfo' },
      { path: '/admin/interfaceInfo', name: '接口信息', component: './Admin/InterfaceInfo' },
      { path: '/admin/interfaceParam', name: '接口参数', component: './Admin/InterfaceParam' },
      { path: '/admin/analysis', name: '统计分析', component: './Admin/Analysis' },
    ],
  },
  { path: '*', layout: false, component: './404' },
];
